<?php
session_start();
$mod_title="мод(ID:$_GET[mid])";
$mod_status="on";
if($mod_status=="on")
{
function mod_body($auth,$adminauth)
{
$level="";
$guildc="";
$arenac="";
if($auth=="ok")
{
$mcl="";
$query = "SELECT * FROM users WHERE login='$_COOKIE[login]'";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$login,$pass,$mail,$reg,$class,$m,$h,$z,$s,$mon,$gold,$pms,$lvl,$ava,$ban,$online) = mysql_fetch_row($cat))
{
$mcl=$class;
$level=$lvl;
}
$query = "SELECT * FROM count";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$guild,$arena) = mysql_fetch_row($cat))
{
$guildc=$guild;
$arenac=$arena;
}
echo "
<img src='img/bo.png'> <a href='?do=game/char'>персонаж($level)</a>|<img src='img/bs.png'> <a href='?do=game/history'>история</a><br>
<br>
";
if(file_exists("usermods/o/$_GET[mid].script"))
{
include "usermods/o/$_GET[mid].script";
//api functions
function GetUserInfo($user)
{
$query = "SELECT * FROM users WHERE login='$user'";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$login,$pass,$mail,$reg,$class,$m,$h,$z,$s,$mon,$gold,$pms,$lvl,$ava,$ban,$online,$exp,$guild,$points,$pvp) = mysql_fetch_row($cat))
{
return "$id,$login,$mail,$reg,$class,$m,$h,$z,$s,$mon,$gold,$pms,$lvl,$ava,$ban,$online,$exp,$guild,$points,$pvp";
}
}
function Locations()
{
$loc="";
$query = "SELECT * FROM location ORDER BY id DESC LIMIT $_pg,$_pg2";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$name) = mysql_fetch_row($cat))
{
$loc="$loc$id,$name;";
}
return $loc;
}
function GetMobs()
{
$loc="";
$query = "SELECT * FROM mobs WHERE inst='$_GET[inst]' ORDER BY lvl DESC LIMIT $_pg,$_pg2";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$name,$inst,$lvl,$s,$m,$h,$expp,$expm,$mp,$mm,$drop) = mysql_fetch_row($cat))
{
$loc="$loc$name,$lvl;";
}
return $loc;
}
function GetMobInfo($mob)
{
$query = "SELECT * FROM mobs WHERE name='$mob'";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$name,$inst,$lvl,$s,$m,$h,$expp,$expm,$mp,$mm,$drop) = mysql_fetch_row($cat))
{
return "$id,$name,$inst,$lvl,$s,$m,$h,$expp,$expm,$mp,$mm,$drop";
}
}
$_xname="no";
$query = "SELECT * FROM mods WHERE login='$_COOKIE[login]' AND mid='$_GET[mid]'";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$login,$name,$mid) = mysql_fetch_row($cat))
{
$_xname=$name;
}
if($_xname!="no")
{
echo "мод:$_xname(ID$_GET[mid])<br><br>";
mod_main($auth,$adminauth,$_COOKIE['login']);
}
else
{
echo "модификация несушествует!<br>";
}
}
else
{
echo "модификация несушествует!<br>";
}
echo "<br>";
include "data/buttons.auth.php";
}
else
{
echo "
Ошибка авторизации!<br>
";
}
}
}
else
{
function mod_body($auth,$adminauth)
{
echo "мод выключен администратором!<br>";
}
}
?>